/*
Base slider
==============================================
Styling for base slider component.
Contains minimal styling for a slider with arrow and/or dot navigation.
based on: https://github.com/ganlanyuan/tiny-slider
*/

.base-slider {
    position: relative;
    overflow: hidden;

    .tns-nav,
    .base-slider-dots {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        margin: 10px 0;

        .base-slider-dot,
        button {
            background-color: $gray-800;
            border: 0;
            height: 8px;
            width: 8px;
            padding: 8px;
            border-radius: 50%;
            margin: 0 8px;

            &:hover,
            &.tns-nav-active {
                background-color: $primary;
            }

            &.tns-nav-active {
                box-shadow: $input-btn-focus-box-shadow;
            }

            &:focus {
                outline: none;
            }
        }
    }

    // Moves navigation dots outside the slider item
    &.has-dots-outside {
        padding-bottom: 40px;

        .tns-nav,
        .base-slider-dots {
            bottom: auto;
        }
    }

    &.has-nav-outside {
        padding-left: 25px;
        padding-right: 25px;
    }

    .tns-ovh {
        overflow: visible;
    }
}

.base-slider-controls {
    margin-bottom: 0;
}

.base-slider-controls-prev,
.base-slider-controls-next {
    display: block;
    width: 30px;
    height: 65px;
    text-align: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    line-height: 68px;
    transition: opacity 0.15s ease;
    cursor: pointer;
    padding: 0;
    color: $body-color;
    background: $body-bg;
    border: 1px solid $body-bg;

    .icon {
        color: currentColor;
    }

    &:hover {
        border-color: $primary;
        color: $primary;
    }

    &[disabled] {
        opacity: 0.5;
        cursor: not-allowed;
    }
}

.base-slider-controls-prev {
    border-radius: 0 $border-radius $border-radius 0;

    &.is-nav-prev-outside {
        border-radius: $border-radius 0 0 $border-radius;
    }
}

.base-slider-controls-next {
    border-radius: $border-radius 0 0 $border-radius;

    &.is-nav-next-outside {
        border-radius: 0 $border-radius $border-radius 0;
    }
}

@include media-breakpoint-up(md) {
    .base-slider {
        .tns-nav,
        .base-slider-dots {
            .base-slider-dot,
            button {
                margin: 0 5px;
            }

            &.hide-dots {
                display: none;
            }
        }
    }
}

@include media-breakpoint-down(md) {
    .base-slider {
        .tns-nav,
        .base-slider-dots {
            width: 55%;
            text-align: center;

            &.hide-dots,
            &.hide-dots-mobile {
                display: none;
            }
        }
    }
}
